﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace eLoan.Models
{
    [Table("Borrower")]
    public class Borrower : BorrowerFields
    { }

    public class BorrowerFields
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        [Display(Name = "ID")]
        public int ID { get; set; }

        [Required]
        [Display(Name = "Borrower Name")]
        [StringLength(100)]
        public string BorrowerName { get; set; }

        [Required]
        [Display(Name = "Branch")]
        public string BranchCode { get; set; }

        [Required]
        [Display(Name = "Agent")]
        public int AgentID { get; set; }

        [Required]
        [Display(Name = "Address")]
        [StringLength(200)]
        public string Address { get; set; }

        [Required]
        [Display(Name = "Contact Numbers")]
        [StringLength(200)]
        public string ContactNumbers { get; set; }

        [Display(Name = "Email Addresses")]
        [StringLength(100)]
        public string EmailAddresses { get; set; }

        [Display(Name = "Credit Limit")]
        [DisplayFormat(DataFormatString = "{0:#,###,##0.00}")]
        public decimal CreditLimit { get; set; }

        [Display(Name = "Is Active")]
        public bool IsActive { get; set; }
    }

}